1

00:00:00,487  -->  00:00:04,605
In the previous video, we already
learn the basic of paramiko.

2

00:00:05,760  -->  00:00:11,518
So now we are able to do a simple
network automation using paramiko.

3

00:00:12,200  -->  00:00:17,151
Next in this video, we are going
to learn more about time sleep.

4

00:00:17,827  -->  00:00:26,274
As I said in the previous video, that the function
of time sleep is to stop the script for 1 second.

5

00:00:27,107  -->  00:00:34,489
We need to stop the script for a second to
wait the cisco command is executed correctly.

6

00:00:35,615  -->  00:00:38,707
Now let’s try to remove the time sleep.

7

00:00:39,436  -->  00:00:48,903
Let’s put hash here. Remember that hash means
comment. So this script is not used anymore.

8

00:00:49,882  -->  00:00:59,445
And then we will create loopback1, the
ip address let’s say 10.1.1.2, save.

9

00:01:00,227  -->  00:01:08,078
Now let’s run the script again,
python paramiko_basic.py.

10

00:01:09,296  -->  00:01:17,129
We will remote router 1, username
cisco, and the password is also cisco.

11

00:01:19,278  -->  00:01:26,385
Here we can see that the cisco command is
not send correctly, we only get a hash here.

12

00:01:27,313  -->  00:01:33,936
Let’s check in the router, here we can
see configure from console by cisco.

13

00:01:34,682  -->  00:01:42,872
So actually the python is already login to the
router. But the command is not send correctly.

14

00:01:43,855  -->  00:01:48,351
Let’s see the interface,
do show ip interface brief,

15

00:01:51,873  -->  00:01:55,409
here we can see that we don’t have loopback1 yet.

16

00:01:56,360  -->  00:01:59,525
Now let’s put the time sleep again.

17

00:02:03,000  -->  00:02:12,069
Run the script again, let’s clear this
first, and then python paramiko_basic.py,

18

00:02:14,273  -->  00:02:23,343
let’s remote router 1, username is
cisco and the password is also cisco.

19

00:02:25,678  -->  00:02:30,800
Here we can see that we are
success login to 10.10.10.1,

20

00:02:30,800  -->  00:02:35,731
which is router 1, and we also
success to send the cisco command,

21

00:02:36,185  -->  00:02:43,740
configure terminal, interface loopack1,
and the ip address is 10.1.1.2,

22

00:02:44,449  -->  00:02:49,277
Let’s check on router 1, do
show ip interface brief,

23

00:02:53,269  -->  00:03:00,585
here we can see that we have loopback1,
and the ip address is 10.1.1.2,

24

00:03:01,680  -->  00:03:05,354
Okay I hope you understand
the function of time sleep,

25

00:03:05,820  -->  00:03:08,305
I think enough for this video

26

00:03:08,614  -->  00:03:12,000
Thank you for watching and see you on the next video.
